package com.kye.express.business.jd_reservation.detail;

import android.content.Context;
import android.content.Intent;
import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;

import com.kye.express.R;
import com.kye.express.business.base.BaseAppCompatActivity;
import com.kye.express.databinding.ActivityJdReservationDetailBinding;
import com.kye.express.utils.ToolbarManager;
import com.kye.model.bean.jd_reservation.JDReservationBean;

public class JdReservationDetailActivity extends BaseAppCompatActivity{
    private static final String KEY_JD_RESERVATION = "KEY_JD_RESERVATION";
    private ActivityJdReservationDetailBinding mBinding;

    public static void startActivity(Context context, JDReservationBean.JDReservation jdReservation) {
        context.startActivity(new Intent(context, JdReservationDetailActivity.class).putExtra(KEY_JD_RESERVATION, jdReservation));
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        mBinding = DataBindingUtil.setContentView(this, R.layout.activity_jd_reservation_detail);

        ToolbarManager.setToolbar(this, mBinding.toolbar);

        mBinding.setBean((JDReservationBean.JDReservation) getIntent().getSerializableExtra(KEY_JD_RESERVATION));
    }
}
